#!/bin/bash

PROJECT="oto"

python setup.py sdist
python setup.py bdist_dumb
VERSION=`cat VERSION`
cp dist/$PROJECT-$VERSION.tar.gz ~/Desktop
# make the deb package
cp dist/$PROJECT-$VERSION.linux-i686.tar.gz packaging
cd packaging
tar -xzf $PROJECT-$VERSION.linux-i686.tar.gz
rm -v $PROJECT-$VERSION.linux-i686.tar.gz
mkdir $PROJECT-$VERSION-0ubuntu1
mv usr $PROJECT-$VERSION-0ubuntu1
cp -R DEBIAN $PROJECT-$VERSION-0ubuntu1/DEBIAN
dpkg-deb --build $PROJECT-$VERSION-0ubuntu1
rm -rfv $PROJECT-$VERSION-0ubuntu1
cd -
rm -rfv build/
